<template>
  <el-carousel class="banner" height="500px" indicator-position="">
    <el-carousel-item v-for="item in bannerList" :key="item.id" >
      <img :src="item.imgUrl" alt="" />
    </el-carousel-item>
  </el-carousel>
</template>

<script setup name="ComponentName">
import {ref,onMounted} from "vue"
import {getBannerAPI} from "@/api/home"


const bannerList = ref([])

const getBanner = async () => {
  const res = await getBannerAPI()
  bannerList.value = res.result
}

onMounted(() => {
  getBanner()
})
</script>

<style scoped lang="scss">
.banner {
  width: 100%;
  img{
    width: 100%;
    height: 500px;
  }
}
</style>
